package com.fanghaoran.notes.dao;

import com.fanghaoran.notes.entity.Evaluation;
import com.fanghaoran.notes.entity.SensitiveBase;

import java.sql.SQLException;
import java.util.List;

/**
 * @Author: win11
 * @Date: 2023/04/24/11:49
 * @Description: 评价业务Dao层
 */
public interface EvaluationDao {

    /**
     * 查询某个订单项的评价
     * @param iid 订单项id
     * @return 返回查询结果
     * @throws Exception 异常
     */
    List<Evaluation> selectEvaluation(int iid) throws Exception;

    /**
     * 插入评价数据
     * @param uid 用户id
     * @param iid 订单项id
     * @param score 评分
     * @param comment 评论
     * @return 返回插入结果
     * @throws SQLException 异常
     */
    Integer insertEvaluation(int uid,int iid, int score, String comment) throws SQLException;

    /**
     * 查询敏感词汇库
     * @return 返回查询结果
     * @throws Exception 异常
     */
    List<SensitiveBase> selectSensitiveBase() throws Exception;
}
